Pattern comparison inspection method and pattern comparison inspection device

ABSTRACT

A pattern comparison inspection apparatus comprises: a reference position selecting portion ( 41 ) which selects from among positions on an inspection target pattern a reference position which is judged whether it should be contained in an inspection region; an image comparing portion ( 42 ) which compares an image signal at the reference position with an image signal at a position located an integral multiple of a repeat pitch away from the reference position; and an inspection region setting portion ( 43 ) which sets the inspection region by containing therein the reference position when a comparison result from the image comparing portion shows a value not greater than a prescribed threshold value. Thus, in the pattern comparison inspection apparatus which performs inspection for a pattern defect by comparing repeated patterns with each other in the inspection target pattern having a repeated pattern region, the inspection region can be enlarged within the bounds of the repeated pattern region.

TECHNICAL FIELD

The present invention relates to a pattern comparison inspection methodand apparatus which performs inspection for a defect, etc. by comparingrepeated patterns, with each other, in a pattern having repeatedpatterns repeated with a prescribed period (pitch) and, moreparticularly, to an appearance inspection method and apparatus whereby apattern such as a photomask pattern or a pattern formed on asemiconductor wafer of a semiconductor memory or the like, havingrepeated cell patterns, is inspected by sequentially comparing one cellpattern with another cell pattern in the neighborhood of the one cellpattern.

BACKGROUND ART

It is widely practiced to generate image data by capturing an image of aformed pattern and to inspect the pattern for a defect, etc. byanalyzing the image data. In particular, in the field of semiconductorfabrication, photomask inspection equipment for inspecting photomasksand appearance inspection equipment for inspecting patterns formed onsemiconductor wafers are widely used. The present invention isapplicable to inspecting any kind of pattern as long as the pattern isone, such as a photomask pattern or a pattern formed on a wafer, that isformed by repeating a basic pattern, but the following description isgiven by taking, as an example, the image data obtained by opticallycapturing an image of a pattern formed on a wafer.

FIG. 27 shows an arrangement of semiconductor chips 201 constructed on asemiconductor wafer 200. As each such semiconductor chip 201 is called adie, the term “die” is also used in this specification. In thefabrication process of semiconductor devices, since many layers ofpatterns are formed on the wafer 200, not only does it take a long timeto complete all the fabrication steps but, if there is a critical defecteven in one layer, the affected die is rendered defective, whichdecreases the fabrication yield. Therefore, it is practiced to capturean image of formed patterns halfway through the process and analyze theimage data to check for defects; if there is a layer containing acritical defect, the layer is removed and formed once again, or defectinformation is fed back to the fabrication process, to improve thefabrication yield. An appearance inspection apparatus (inspectionmachine) is used for this purpose.

FIG. 28 is a diagram schematically showing the configuration of a priorart appearance inspection apparatus. As shown in FIG. 28, the wafer 200is held on a stage 211. Light emitted from a light source 214 isconverged by a condenser lens 215 and reflected by a half-silveredmirror 213 into an objective lens 212 through which the light is focusedto illuminate the surface of the wafer 200. An optical image on theilluminated surface of the wafer 200 is projected via the objective lens212 onto an imaging device 216 (refer, for example, to JapaneseUnexamined Patent Publication No. 2002-342757).

The imaging device 216 converts the optical image into an image signalwhich is an electrical signal. The image signal is then converted intoimage data in digital form, and stored in an image memory 217. An imageprocessor 218 processes the image data stored in the image memory 217and checks for the presence or absence of a defect, etc. A controller219 controls the various parts of the apparatus, such as the stage 211,the image memory 217, and the image processor 218.

Patterns formed on semiconductor devices are very fine, and an extremelyhigh resolving power is required of the appearance inspection apparatus.In view of this, a one-dimensional image sensor is used as the imagingdevice, and the stage 211 is moved (scanned) in a single direction, insynchronism with which the output of the imaging device is sampled toobtain the image data.

When the width H on the wafer that can be captured by the sensor at onetime is smaller than the width of each die 201, the correspondingportions on the respective dice are scanned in sequence as, for example,shown in FIG. 27, and when the scanning is completed for all the dice,the next corresponding portions on the respective dice are scanned insequence, and so on to obtain the image data for all the portions ofeach die. This serves to improve throughput because the image data canbe obtained by performing the scanning while, at the same time, makingcomparisons between the corresponding portions of the dice obtained fromthe previous scanning. The method of scanning is not limited to theabove-described one and various other methods have been proposed.

FIG. 29 is a diagram for explaining how the image data are comparedbetween adjacent dice. It is assumed that dice A, B, C, and D arearranged as shown in FIG. 29. The image data are defined with each pixel210 treated as a unit.

As shown, when comparing the image data between the dice B and C, theimage data (pixel data) of the corresponding pixels on the dice B and Care compared with each other. For example, the pixel data in the firstcolumn in row “a” on the die B is compared with the corresponding pixeldata on the die C.

The comparison of the image data between the dice is usually done bygenerating and storing the image data in sequence starting from the dieat one end and, by comparing the newly generated image data of each diewith the previously generated and stored image data of the precedingdie, that is, first between A and B, then between B and C, and thenbetween C and D. In this way, each of the dice located between the diceat both ends is compared twice, first with one adjacent die and thenwith the other adjacent die; if the result of the comparison does notshow a match in any of the two comparisons, then the condition isdetermined as being a fault (a defect is detected). Such a comparisonbetween dice is called a die-to-die comparison.

Semiconductor memories, etc. are formed from repeated patterns of abasic unit called a cell, and the pattern is formed by repeating thebasic pattern corresponding to the cell. FIG. 30 is a diagram forexplaining such cells; as shown, the cells 231 are arranged in arepeated fashion within the die 201. When inspecting the pattern inwhich such cells are arranged at a prescribed pitch, the presence orabsence of a defect is checked, not by the die-to-die comparisondescribed above, but by comparing the corresponding image data betweenadjacent cells. Such a comparison is called a cell-to-cell comparison.

In the cell-to-cell comparison, like the die-to-die comparison describedabove, the comparison is usually done by generating and storing theimage data in sequence starting from the cell at one edge, and bycomparing the newly generated image data of each cell with thepreviously generated and stored image data of its adjacent cell.

DISCLOSURE OF INVENTION

In cell-to-cell comparison, if image data of a pattern outside arepeated pattern region 232 is contained in the image data of one of thetwo cells to be compared, the patterns of the two cells do not match,resulting in false detection of a defect; therefore, care must be takento ensure that none of the image data to be compared in the cell-to-cellcomparison contains a pattern outside the repeated pattern region 232.

In the prior art inspection apparatus, an inspection region (care area)233 has been set by providing a margin to each edge of the repeatedpattern region 232, for reasons such as the mechanical accuracy of thestage 211, etc. on which the wafer 200 is held. Then, the cell-to-cellcomparison has been performed only on the patterns inside the inspectionregion 233, and the repeated patterns outside the inspection region 233have been inspected by using the die-to-die comparison technique.

However, the patterns are formed at high density in the repeated patternregion 232, while the peripheral circuit patterns outside the repeatedpattern region 232 are formed at low density; as a result, the patternsinside the repeated pattern region 232 are detected as dark areas, whilethe peripheral circuit patterns are detected as light areas.

Accordingly, in the case of the die-to-die comparison in which both therepeated patterns outside the inspection region 233 and the peripheralcircuit patterns are contained, as the image of the repeated patternregion 232 is detected much darker than the image of the peripheralcircuit patterns, there has been the problem that the defect detectionsensitivity drops for the repeated patterns outside the inspectionregion 233.

In view of the above situation, in a pattern comparison inspectionmethod and apparatus which performs inspection for a pattern defect bycomparing repeated patterns with each other in an inspection targetpattern having a repeated pattern region, it is an object of the presentinvention to enlarge the inspection region, where the repeated patternsare compared with each other, as far as possible within the bounds ofthe repeated pattern region.

To achieve the above object, in a pattern comparison inspection methodaccording to a first mode of the present invention, a referenceposition, which is judged whether it should be contained in theinspection region is selected, an image signal at the reference positionis compared with an image signal at a position located an integralmultiple of a repeat pitch away from the reference position, and whenthe result of the comparison shows a value not greater than a prescribedthreshold value, the inspection region is set so as to contain thereinthe reference position.

The pattern comparison inspection method according to the presentinvention will be described below with reference to FIGS. 1 and 2. FIG.1 is a diagram for explaining the basic principle of the patterncomparison inspection method according to the present invention, andFIG. 2 is a flowchart of the pattern comparison inspection methodaccording to the first mode of the present invention.

As shown in FIG. 1, repeated patterns 2 are formed as cells in arepeated fashion at a prescribed repeat pitch within a repeated patternregion 3 on a die 1. In step S101, image data is acquired from a regionABA′B′ on the die 1 by scanning the region with an imaging means such asa one-dimensional image sensor.

In step S103, the reference position, which is judged whether it shouldbe contained in the inspection region, is selected from among positionswithin the image data of the region ABA′B′. Here, the reference positionis set at two positions respectively located x₁ and x₂ away from theedge of the die 1.

In step S105, the image signal (pixel block) at the reference positionis compared with an image signal at a position located inwardly of thereference position and spaced apart from it by an integral multiple ofthe repeat pitch of the repeated patterns. Here, the pixel block 4located at the distance x₁ from the edge of the die 1 is compared withthe pixel block 4′ located away from the pixel block 4 by a distanceequal to the repeat pitch and, likewise, the pixel block 5 located atthe distance x₂ from the edge of the die 1 is compared with the pixelblock 5′ located away from the pixel block 5 by a distance equal to therepeat pitch.

In the pixel block comparison, the grayscale values of the correspondingpixels in the respective pixel blocks are compared with each other, anda count of the number of pixels found to have a grayscale valuedifference greater than a predetermined inter-pixel comparison thresholdvalue may be taken as the result of the comparison. It will also benoted that the integer that defines the spacing between the referenceposition and the position spaced away from it by an integral multiple ofthe repeat pitch need not necessarily be the same as the integer thatdefines the cell spacing in the cell-to-cell comparison.

When the pixel block 5 located at the distance x₂ from the edge of thedie 1 is compared with its corresponding pixel block 5′, the value ofthe comparison result is small because both pixel blocks are constructedfrom image data obtained by capturing the same portion of the repeatedpattern; on the other hand, when the pixel block 4 located at thedistance x₁ from the edge of the die 1 is compared with itscorresponding pixel block 4′, the value of the comparison result islarge because these blocks are constructed from image data obtained bycapturing respectively different patterns.

Accordingly, in steps S107 and S109, while incrementally shifting thereference position in one prescribed direction outwardly (or inwardly)toward the boundary of the repeated pattern region 3, a search is madeto detect a position x_(p) at which the value of the comparison resultbecomes larger (or smaller) than the number of pixels defined by thepredetermined threshold value t_(h). In this way, the region bounded bythe reference position at which the value of the comparison resultbecomes larger (or smaller) than the predetermined threshold value t_(h)is obtained, and this region is set as the inspection region in stepS111.

By obtaining the region bounded by the reference position at which thevalue of the comparison result becomes smaller than the predeterminedthreshold value t_(h), and by setting this region as the inspectionregion, as described above, the inspection region can be enlarged as faras possible within the bounds of the repeated pattern region 3.

As shown in FIG. 1, when the reference position is incrementally shiftedin one prescribed direction outwardly (or inwardly) toward the boundaryof the pattern region 3, the value of the comparison result abruptlychanges (increases) when the reference position reaches the positionx_(p) at the boundary of the repeated pattern region 3.

In view of this, in a pattern comparison inspection method according toa second mode of the present invention, the reference position, which isjudged whether it should be contained in the inspection region, isselected while incrementally shifting the reference position by aprescribed distance within the inspection target pattern, the imagesignal at the reference position is compared with an image signal at aposition located an integral multiple of the repeat pitch away from thereference position, and the reference position is set as the boundary ofthe inspection region when the result of the comparison shows a changegreater than a prescribed threshold value.

FIG. 3 is a flowchart according to the second mode of the presentinvention.

In step S114, the contents of a storing portion for storing the previouscomparison result are initialized. This storing portion is used tocompare the previous comparison result with the present comparisonresult and compute the amount of change or rate of change between thecomparison results.

Then, as in the pattern comparison inspection method according to thefirst mode described above, the image data of the region ABA′B′ on thedie 1 is acquired in step S101, the reference position is selected instep S103 from among positions within the image data of the regionABA′B′, and the image signal (pixel block) at the reference position iscompared in step S105 with an image signal at a position locatedinwardly of the reference position and spaced apart from it by anintegral multiple of the repeat pitch of the repeated patterns.

In step S107, the amount of change or rate of change between thecomparison result stored in the storing portion and the comparisonresult obtained in step S105 is computed, and it is determined whetherthe amount of change or rate of change between the comparison results isnot greater than a predetermined threshold value t_(v). If the amount orrate of change between the comparison results is not greater than thepredetermined threshold value t_(v), then in step S115 the comparisonresult obtained in step S105 is stored in the storing portion forcomputation of the amount or rate of change for the next time, and instep S109, the reference position is shifted in one prescribed directionoutwardly (or inwardly) toward the boundary of the repeated patternregion 3. After that, the process returns to step S105, to repeat thesteps S105, S107, S115 and S109.

If the result of the determination in step S107 shows that the rate ofchange between the comparison results is greater than the predeterminedthreshold value t_(v), then in step S111 the inspection region isdetermined by setting the present reference position as the boundary ofthe inspection region.

Here, in step S107, instead of determining whether the amount or rate ofchange of the comparison result is not greater than the predeterminedthreshold value t_(v), it may be determined whether or not the amount orrate of change of the comparison result becomes a maximum and, if theamount or rate of change of the comparison result is a maximum, thepresent reference position may be set as the boundary of the inspectionregion in step S111. For this purpose, the storing portion may beconfigured to store the largest value among the amounts or rates ofchange of the comparison results computed in the past loops, in additionto the comparison result obtained in the previous loop (S105, S107,S115, and S109). Then, in step S115, when storing the comparison resultobtained in S105, it may be determined whether the amount or rate ofchange of the comparison result, computed in step S107, exceeds thelargest value of the amount or rate of change of the comparison resultstored in the storing portion and, if it exceeds the largest value, thenthe largest value of the amount or rate of change of the comparisonresult, stored in the storing portion, may be updated accordingly.

A pattern comparison inspection method according to a third mode of thepresent invention, which captures an image of an inspection targetpattern having a repeated pattern region with repeated patterns formedin a repeated fashion at a prescribed repeat pitch, and which detects adefect in the inspection target pattern by comparing image signals takenfrom positions located an integral multiple of the repeat pitch awayfrom each other, comprises: a defect candidate detecting step forcomparing a predetermined first threshold value with a difference valuebetween pixels separated from each other by a number of pixelsequivalent to the integral multiple of the repeat pitch in the capturedimage of the inspection target pattern, and for detecting any pixel forwhich the difference value exceeds the first threshold value as a defectcandidate; an inspection range determining step for selecting areference range of a prescribed size within the captured image of theinspection target pattern, and for determining an inspection range bycontaining therein the reference range if the number of defectcandidates contained in the reference range or the proportion of thedefect candidates contained in the reference range is smaller than apredetermined second threshold value; and a detecting step for detectinga defect in the inspection target pattern within the inspection range.

The pattern comparison inspection method according to the third mode ofthe present invention may further comprise: a defect candidate mapgenerating step for generating a defect candidate map by obtaining adefect candidate in the defect candidate detecting step for each pixelin the captured image of the inspection target pattern; and a referencerange selecting step for selecting a reference range of a prescribedsize within the defect candidate map, wherein the inspection rangedetermining step determines the inspection range by containing thereinthe selected reference range if the number of defect candidatescontained in the reference range or the proportion of the defectcandidates contained in the reference range is smaller than thepredetermined second threshold value.

A pattern comparison inspection method according to a fourth mode of thepresent invention, which captures an image of an inspection targetpattern having a repeated pattern region with repeated patterns formedin a repeated fashion at a prescribed repeat pitch, and which detects adefect in the inspection target pattern by comparing image signals takenfrom positions located an integral multiple of the repeat pitch awayfrom each other, comprises: a defect candidate detecting step forcomparing a predetermined first threshold value with a difference valuetaken between pixels separated from each other by a number of pixelsequivalent to the integral multiple of the repeat pitch in the capturedimage of the inspection target pattern, and for detecting any pixel forwhich the difference value exceeds the first threshold value as a defectcandidate; an inspection range determining step for selecting areference range of a prescribed size within the captured image of theinspection target pattern by incrementally changing the position of thereference range relative to a prescribed direction, and for determiningan inspection range by containing therein the position relative to theprescribed direction if the number of defect candidates contained in thereference range or the proportion of the defect candidates contained inthe reference range is smaller than a predetermined second thresholdvalue; and a detecting step for detecting a defect in the inspectiontarget pattern within the inspection range.

The pattern comparison inspection method according to the fourth mode ofthe present invention may further comprise: a defect candidate mapgenerating step for generating a defect candidate map by obtaining adefect candidate in the defect candidate detecting step for each ispixel in the captured image of the inspection target pattern; and areference range selecting step for selecting a reference range of aprescribed size within the defect candidate map, wherein the inspectionrange determining step determines the inspection range by containingtherein the selected reference range if the number of defect candidatescontained in the reference range or the proportion of the defectcandidates contained in the reference range is smaller than thepredetermined second threshold value.

A pattern comparison inspection apparatus according to a fifth mode ofthe present invention comprises: a reference position selecting portionwhich selects from among positions on the inspection target pattern thereference position which is judged whether it should be contained in theinspection region; an image comparing portion which compares an imagesignal at the reference position with an image signal at a positionlocated an integral multiple of the repeat pitch away from the referenceposition; and an inspection region setting portion which sets theinspection region by containing therein the reference position when theresult of the comparison from the image comparing portion shows a valuenot greater than a prescribed threshold value.

Further, a pattern comparison inspection apparatus according to a sixthmode of the present invention comprises: a reference position selectingportion which selects the reference position which is judged whether itshould be contained in the inspection region, by incrementally shiftingthe reference position by a prescribed distance within the inspectiontarget pattern; an image comparing portion which compares an imagesignal at the reference position with an image signal at a positionlocated an integral multiple of the repeat pitch away from the referenceposition; and an inspection region setting portion which sets thereference position as the boundary of the inspection region when theresult of the comparison obtained from the image comparing portion as aresult of incrementally shifting the reference position by theprescribed distance shows a change greater than a prescribed thresholdvalue.

A pattern comparison inspection apparatus according to a seventh modecomprises: an imaging portion which captures an image of an inspectiontarget pattern having a repeated pattern region with repeated patternsformed in a repeated fashion at a prescribed repeat pitch; a patterncomparing portion which compares, on the captured image, image signalstaken from positions located an integral multiple of the repeat pitchaway from each other; a defect detecting portion which detects a defectin the inspection target pattern based on the result of the comparison;a defect candidate detecting portion which compares a predeterminedfirst threshold value with a difference value taken between pixelsseparated from each other by a number of pixels equivalent to theintegral multiple of the repeat pitch in the captured image of theinspection target pattern, and which detects any pixel for which thedifference value exceeds the first threshold value as a defectcandidate; and an inspection range determining portion which selects areference range of a prescribed size within the captured image of theinspection target pattern, and which determines an inspection range bycontaining therein the reference range if the number of defectcandidates contained in the reference range or the proportion of thedefect candidates contained in the reference range is smaller than apredetermined second threshold value, wherein the defect detectingportion detects a defect in the inspection target pattern within theinspection range.

The pattern comparison inspection apparatus according to the seventhmode of the present invention may further comprise: a defect candidatemap generating portion which generates a defect candidate map byobtaining a defect candidate from the defect candidate detecting portionfor each pixel in the captured image of the inspection target pattern;and a reference range selecting portion which selects a reference rangeof a prescribed size within the defect candidate map. In this case, theinspection range determining portion may determine the inspection rangeby containing therein the selected reference range if the number ofdefect candidates contained in the reference range or the proportion ofthe defect candidates contained in the reference range is smaller thanthe predetermined second threshold value.

A pattern comparison inspection apparatus according to an eighth modecomprises: an imaging portion which captures an image of an inspectiontarget pattern having a repeated pattern region with repeated patternsformed in a repeated fashion at a prescribed repeat pitch; a patterncomparing portion which compares, on the captured image, image signalstaken from positions located an integral multiple of the repeat pitchaway from each other; a defect detecting portion which detects a defectin the inspection target pattern based on the result of the comparison;a defect candidate detecting portion which compares a predeterminedfirst threshold value with a difference value taken between pixelsseparated from each other by a number of pixels equivalent to theintegral multiple of the repeat pitch in the captured image of theinspection target pattern, and which detects any pixel for which thedifference value exceeds the first threshold value as a defectcandidate; and an inspection range determining portion which selects areference range of a prescribed size within the captured image of theinspection target pattern by incrementally changing the position of thereference range relative to a prescribed direction, and which determinesan inspection range by containing therein the position relative to theprescribed direction if the number of defect candidates contained in thereference range or the proportion of the defect candidates contained inthe reference range is smaller than a predetermined second thresholdvalue, wherein the defect detecting portion detects a defect in theinspection target pattern within the inspection range.

The pattern comparison inspection apparatus according to the eighth modeof the present invention may further comprise: a defect candidate mapgenerating portion which generates a defect candidate map by obtaining adefect candidate from the defect candidate detecting portion for eachpixel in the captured image of the inspection target pattern; and areference range selecting portion which selects a reference range of aprescribed size within the defect candidate map by incrementallychanging the position of the reference range relative to a prescribeddirection, wherein the inspection range determining portion determinesthe inspection range by containing therein the position relative to theprescribed direction if the number of defect candidates contained in thereference range or the proportion of the defect candidates contained inthe reference range is smaller than the predetermined second thresholdvalue.

In the pattern comparison inspection method and apparatus according tothe present invention described in this specification, the cell regionformed within a die is selected as the repeated pattern region, and theinspection range is set for the pattern comparison inspection of thecell region within the die, but alternatively, the pattern comparisoninspection method and apparatus according to the present invention maybe used to select the die region formed on a wafer as the repeatedpattern region and to set the inspection range for the patterncomparison inspection of the die region.

According to the present invention, the inspection region where repeatedpatterns are compared with each other can be enlarged as far as possiblein a pattern comparison inspection, which checks for the presence orabsence of a pattern defect, by comparing the repeated patterns witheach other within the inspection target pattern.

Further, as in the pattern comparison inspection methods according tothe third and fourth modes and the pattern comparison inspectionapparatuses according to the seventh and eighth modes of the presentinvention, if the inspection range is determined by using the defectcandidates detected for the defect inspection, the amount of computationrequired to compare the pixel values of the captured image to determinethe inspection range can be reduced, which contributes to enhancing theinspection speed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram for explaining the basic principle of a patterncomparison inspection method according to the present invention.

FIG. 2 is a flowchart of a pattern comparison inspection methodaccording to a first mode of the present invention.

FIG. 3 is a flowchart of a pattern comparison inspection methodaccording to a second mode of the present invention.

FIG. 4 is a diagram schematically showing the configuration of a patterncomparison inspection apparatus according to an embodiment of thepresent invention.

FIG. 5 is a flowchart (part 1) of a pattern comparison inspection methodaccording to a first embodiment of the present invention.

FIG. 6 is a flowchart (part 2) of the pattern comparison inspectionmethod according to the first embodiment of the present invention.

FIG. 7 is a diagram for explaining how a tentative region is set on aninspection pattern having a repeated pattern region.

FIG. 8 is a diagram for explaining a method for capturing an image ofthe inspection pattern having the repeated pattern region.

FIG. 9A and FIG. 9B are diagrams each showing an image signal of thecaptured inspection pattern. FIG. 9C is a graph showing how the value ofa comparison result varies as a reference position is moved.

FIG. 10A and FIG. 10B are diagrams each showing the condition in which adefect image is contained in the image signal of the captured inspectionpattern.

FIG. 11 is a flowchart (part 3) of the pattern comparison inspectionmethod according to the first embodiment of the present invention.

FIG. 12 is a flowchart (part 4) of the pattern comparison inspectionmethod according to the first embodiment of the present invention.

FIG. 13A and FIG. 13B are diagrams each showing an image signal of thecaptured inspection pattern. FIG. 13C is a graph showing how the valueof the comparison result varies as the reference position is moved. FIG.13D is diagram showing an image signal of the captured inspectionpattern.

FIG. 14 is a diagram for explaining a technique for storing capturedimages of the inspection pattern.

FIG. 15 is a flowchart (part 1) of a pattern comparison inspectionmethod according to a second embodiment of the present invention.

FIG. 16 is a flowchart (part 2) of the pattern comparison inspectionmethod according to the second embodiment of the present invention.

FIG. 17 is a diagram for explaining how the tentative region is set onthe inspection pattern according to the second embodiment.

FIG. 18A and FIG. 18B are diagrams each showing an image signal of thecaptured inspection pattern. FIG. 18C is a graph showing how the valueof the comparison result varies as the reference position is moved.

FIG. 19A is diagram showing a repeated pattern region having a defect.FIG. 19B is a graph showing how the value of the comparison resultvaries.

FIG. 20 is a diagram schematically showing the configuration of apattern comparison inspection apparatus according to a third embodimentof the present invention.

FIG. 21 is a flowchart of a pattern comparison inspection methodaccording to the third embodiment of the present invention.

FIG. 22A is a diagram showing an image signal of a captured inspectionpattern.

FIG. 22B is a diagram showing an image signal obtained by delaying theimage signal shown in FIG. 22A.

FIG. 22C is a diagram showing a defect map image signal generated basedon the difference between FIGS. 22A and 22B.

FIG. 22D is a diagram showing the defect map image signal in itsentirety.

FIG. 23A is a diagram showing the defect map image signal.

FIG. 23B is a graph showing the variation, along an X direction, of thenumber of defect candidates contained in a reference range.

FIG. 24 is a diagram schematically showing the configuration of apattern comparison inspection apparatus according to a fourth embodimentof the present invention.

FIG. 25 is a flowchart of a pattern comparison inspection methodaccording to the fourth embodiment of the present invention.

FIG. 26 is a diagram for explaining the pattern comparison inspectionmethod according to the fourth embodiment of the present invention.

FIG. 27 is a diagram showing an arrangement of semiconductor chips(dice) constructed on a semiconductor wafer and a scanning path fortesting.

FIG. 28 is a diagram schematically showing the configuration of anappearance inspection apparatus for inspecting the dice formed on thesemiconductor wafer.

FIG. 29 is a diagram for explaining a die-to-die comparison.

FIG. 30 is a diagram for explaining cells, a repeated pattern region,and an inspection region within a die.

BEST MODE FOR CARRYING OUT THE INVENTION

Embodiments of the present invention will be described below withreference to the accompanying drawings. FIG. 4 is a diagramschematically showing the configuration of a pattern comparisoninspection apparatus according to a first embodiment of the presentinvention.

The pattern comparison inspection apparatus 10 comprises: a stage 21 forholding thereon a wafer 22 on which circuit patterns or the likecontaining repeated patterns of memory cells, etc. are formed; animaging portion 20, such as a one-dimensional image sensor, forcapturing an image of the patterns formed on the wafer 22; and a stagecontroller 29 for moving the stage 21 so that the wafer 22 is scanned bythe imaging portion 20 in order for the imaging portion 20 to capturethe image of the patterns across the entire surface of the wafer 22.

The pattern comparison inspection apparatus 10 further comprises: an A/Dconverter 23 which converts the captured analog image signal into animage signal in digital form; an image memory 24 which stores the thusconverted image signal pattern in digital form; a die comparing portion25 which, based on the stored image signal pattern, performs adie-to-die comparison on the patterns formed on the wafer 22; a cellcomparing portion 26 which performs a cell-to-cell comparison; a defectdetecting section 27 which detects a defect in the formed pattern basedon the result of the comparison; and a result output portion 28 whichoutputs the detected result.

The pattern comparison inspection apparatus 10 further comprises settingportion which sets, within the captured pattern image, an inspectionregion in which the cell comparing portion 26 performs the cell-to-cellcomparison, the setting portion including a tentative region settingportion 40, a reference position selecting portion 41, an imagecomparing portion 42, and an inspection region setting portion 43 shownin FIG. 4. Position data indicating the position of each pattern formedon the wafer 22 is supplied to a control portion 46 which, based on theposition data, computes the position of the repeated pattern region 3 onthe wafer 22 and supplies it to the tentative region setting portion 40.

The operation of the pattern comparison inspection apparatus 10 will bedescribed below with reference to FIGS. 5 to 15.

FIG. 5 is a flowchart of a pattern comparison inspection methodaccording to the first embodiment of the present invention, forexplaining the operation of the pattern comparison inspection apparatus10.

In step S131, an X-direction tentative region bounded by boundary lines51 and 52 is set in relationship to the repeated pattern region 3 inwhich repeated patterns 2 are formed in a repeated fashion, as shown inFIG. 7, on the die 1 fabricated on the wafer 22. Here, the X and Ydirections are defined as shown in FIG. 7.

As the position of the repeated pattern region 3 computed by the controlportion 46 is computed based on CAD data, etc. used when forming thepatterns on the wafer 22, an error may occur between the position thuscomputed and the position on the image data captured by the imagingportion 20, because of the effects of the previously described apparatuserrors. The X-direction tentative region is set inside the repeatedpattern region 3 given from the control portion 46, by providing amargin with respect to each edge of the region 3 to ensure that thetentative region will invariably lie inside the repeated pattern region3 despite the occurrence of the above error. The margin is determinedaccording to the mechanical accuracy of the stage 21, etc.

In step S133, the imaging portion 20 is operated to scan the die 1 tocapture the image of the pattern formed thereon. For convenience ofexplanation, an X-axis and a Y-axis are set on the surface of the wafer22, the former along the scanning direction of the imaging means 20 andthe latter along a direction at right angles to the scanning direction.The scanning by the imaging means 20 is performed in a number of stepsaccording to its image capturing size (the number of devices whoseimages are to be captured simultaneously) and the size of the die 1. Inthe example of FIG. 8, each die 1 is scanned in three steps S1 to S3.The captured image signal is converted by the A/D converter 23 into adigital signal which is stored in the image memory 24. The image signal60 acquired in a single scanning step and stored in the image memory 24is shown in FIG. 9A.

In step S135, the reference position which is judged whether it shouldbe contained in the inspection region is set inside the X-directiontentative region. In the illustrated example, the reference position isset at a distance X₀ from the edge of the die 1.

In step S137, a pixel column block 61 located at the reference positionin the captured image is compared with a pixel column block 62 locatedan integral multiple of repeat pitchs (x_(T)) away from the referenceposition. In the pixel block comparison, the grayscale values of thecorresponding pixels in the respective pixel blocks are compared witheach other, and a count of the number of pixels found to have agrayscale value difference greater than a predetermined inter-pixelcomparison threshold value is taken as the result of the comparison.

In step S139, the value of the comparison result is compared with apredetermined threshold pixel count value t_(h). As the referenceposition is currently located inside the X-direction tentative region(step S137), the pixel column block 61 and the pixel column block 62 areboth located inside the repeated pattern region 3, which means that thecaptured images of the two blocks represent the same portion of therepeated pattern 2. As a result, the value of the comparison result issmall as shown in FIG. 9C, that is, smaller than the predeterminedthreshold value.

In step S141, the reference position is moved by a fine increment of Δxoutwardly toward the boundary of the repeated pattern region 3, afterwhich the process proceeds to step S137. As the result of the comparisonshows a value not greater than the predetermined threshold value untilthe reference position reaches the position x_(p) located at theboundary of the repeated pattern region 3, the process from step S137 toS141 is repeated.

FIG. 9B is a diagram showing the state in which the reference positionhas reached the position x_(p) located at the boundary of the repeatedpattern region 3. Here, when the pixel column block 61 located at thereference position in the captured image is compared in step S137 withthe pixel column block 62 located an integral multiple of repeat pitch(x_(T)) away from the reference position, as the reference position islocated at the boundary of the repeated pattern region 3, the value ofthe comparison result rapidly increases upon reaching the boundary, andexceeds the predetermined threshold value t_(h) as shown in FIG. 9C.

Therefore, in step S139, it is determined that the value of thecomparison result has exceeded the predetermined threshold value t_(h),and the position defined by (present reference position−prescribed shiftamount Δx) is set as the inspection region boundary (step S143).

In this case, in the position x_(p) at which the result of thecomparison between the pixel column block 61 located at the referenceposition in the captured image and the pixel column block 62 located anintegral multiple of repeat pitch (x_(T)) away from the referenceposition exceeds the threshold value t_(h), a small amount of noise maybe contained in the image of the pixel column block 61; accordingly, theposition displaced inwardly of the pattern region 3 by a prescribednumber of pixels from the position x_(p) may be determined as the actualinspection region boundary.

After that, in step S145, the die comparing portion 25 performs thedie-to-die comparison based on the image signal outside the determinedinspection region, and the cell comparing portion 26 performs thecell-to-cell comparison based on the image signal inside the determinedinspection region.

If there is a defect 63 near the boundary of the pattern region 3 asshown in FIG. 10A, the result of the comparison between the pixel columnblock 61 located at the reference position in the captured image and thepixel column block 62 located an integral multiple of repeat pitchesaway from the reference position exceeds the threshold value t_(h)before the reference position reaches the boundary of the pattern region3, and as a result, the boundary of the inspection region is set at aposition x_(d) inward of the boundary of the pattern region 3.

Accordingly, when there is such a defect 63 near the boundary of thepattern region 3, the boundary of the inspection region varies dependingon the scanning position of the imaging portion 20 (in the example ofFIG. 8, depending on whether the scanning position is S1, S2, or S3),and the finally set inspection region has a boundary as shown by acontinuous line 64 in FIG. 10B. Therefore, the presence of the defect 63located at the boundary of the pattern region 3 can be detected bycomputing the difference G_(x) of the inspection region boundaryposition between the respective scanning positions or the differencebetween the thus set boundary position of the inspection region and thegiven boundary position of the pattern region 3 or the boundary positionof the X-direction tentative region.

The inspection region setting portion 43 outputs the boundary positionof the inspection region thus set for each scanning position, and theboundary position is supplied via the inspection region output portion45 to the control portion 46 which has a display device. Further, whenthe difference G_(x) of the inspection region boundary position, or thedifference between the thus set boundary position of the inspectionregion and the given boundary position of the pattern region 3 or theboundary position of the X-direction tentative region, is greater than apredetermined value, the inspection region setting portion 43 instructsthe error output portion 44 to produce an error output to the controlportion 46, or sends a defect output signal to the result output portion28.

As described above, the inspection region setting portion 43 can set theinspection region boundary on the cell-to-cell comparison start side ifit is at least supplied with an image signal for a width equal to (thedistance from the edge of the die 1 to the tentative region boundary51+one repeat pitch length (x_(T)) of the repeated pattern).Accordingly, provisions may be made for the inspection region settingportion 43 to start the inspection region setting process immediatelyafter acquiring the necessary amount of image signal even when theacquisition of the entire scanned image 60 for one scan is not completedyet.

As shown in FIG. 9C, when the reference position is incrementallyshifted in one prescribed direction outwardly (or inwardly) toward theboundary of the pattern region 3, the value of the comparison resultabruptly changes (increases) when the reference position reaches theposition x_(p) at the boundary of the repeated pattern region 3.

Accordingly, in the flowchart shown in FIG. 5, instead of determining instep S139 that the value of the comparison result has exceeded thepredetermined threshold value t_(h), and setting in step S143 thereference position as the boundary of the inspection region when thevalue of the comparison result has exceeded the predetermined thresholdvalue t_(h), a determination may be made as to whether the amount ofchange or rate of change between the result of the comparison performedin the previous loop and the result of the comparison performed in thepresent loop exceeds a predetermined threshold value and, when thisamount of change or rate of change exceeds the predetermined thresholdvalue, the present reference position may be set as the boundary of theinspection region. FIG. 6 shows a flowchart of the pattern comparisoninspection method according to the first embodiment of the presentinvention, for explaining such an operation of the pattern comparisoninspection apparatus 10.

In step S147, the contents of a storing portion for storing the previouscomparison result are initialized. This storing portion is used tocompare the previous comparison result with the present comparisonresult and compute the amount of change or rate of change between thecomparison results.

Then, as in the pattern comparison inspection method shown in FIG. 5,the X-direction tentative region is set in step S131, an image of thepattern formed on the die 1 is captured in step S133 by scanning the die1 with the imaging portion 20, the reference position which is judgedwhether it should be contained in the inspection region is set insidethe X-direction tentative region in step S135, and the pixel columnblock 61 located at the reference position is compared in step S137 withthe pixel column block 62 located an integral multiple of repeat pitch(x_(T)) away from the reference position.

In step S148, the amount of change or rate of change between thecomparison result stored in the storing portion (the comparison resultobtained in step S137 in the previous loop) and the comparison resultobtained in step S137 (in the present loop) is computed, and it isdetermined whether the amount of change or rate of change between thecomparison results is greater than a predetermined threshold valuet_(v). If the amount of change or rate of change between the comparisonresults is not greater the predetermined threshold value t_(v), then instep S149 the comparison result obtained in step S137 is stored in thestoring portion for computation of the amount of change or rate ofchange for the next time, and in step S141, the reference position isshifted outwardly toward the boundary of the repeated pattern region 3.After that, the process returns to step S137, to repeat the steps S137,S148, S149, and S141.

If the result of the determination in step S148 shows that the amount ofchange or rate of change between the comparison results is greater thanthe predetermined threshold value t_(v), then, in step S143, theinspection region is determined by setting the present referenceposition as the boundary of the inspection region. After that, in stepS145, the die comparing section 25 performs the die-to-die comparisonbased on the image signal outside the determined inspection region, andthe cell comparing section 26 performs the cell-to-cell comparison basedon the image signal inside the determined inspection region.

In the method shown in FIG. 5, the inspection region has been enlargedin the scanning direction (X direction) of the imaging means 20; on theother hand, when the image data acquired by the imaging means 20contains the boundary positions of the pattern region 3 in the Ydirection, such as the image data obtained, for example, in the scanningpositions S1 and S3 shown in FIG. 8, the inspection region can also beenlarged in the direction (Y direction) at right angles to the scanningdirection of the imaging means 20. FIG. 11 shows the flowchart for thatcase.

In step S151, a Y-direction tentative region bounded by boundary lines53 and 54 is set in relationship to the repeated pattern region 3 asshown in FIG. 7. The Y-direction tentative region, like the X-directiontentative region, is set inside the repeated pattern region 3 byproviding a margin with respect to each edge thereof.

When the image data acquired by the imaging portion 20 contains theboundary positions of the pattern region 3 in the Y direction (forexample, when the scanning is done along the scanning position S1 shownin FIG. 8), then in step S153 the inspection region boundary 64 at whichthe cell-to-cell comparison is to be started in the X direction isdetermined in accordance with the method of FIG. 5. In this case, theboundary may be determined after the entire scanned image 60 for onescan has been acquired and stored in the image memory 24, oralternatively, to improve the inspection throughput, the inspectionregion boundary on the cell-to-cell comparison start side may be setwhen an image signal for a width equal to (the distance from the edge ofthe die 1 to the tentative region boundary 51+one repeat pitch length(x_(T)) of the repeated pattern) has been acquired.

After waiting for image data having a prescribed pixel column widthw_(s) from the boundary 64 of the X-direction inspection region at whichthe cell-to-cell comparison is to be started, to be captured, the imagedata is acquired in step S133. An image signal 60 of the image datahaving the prescribed pixel column width w_(s) is shown in FIG. 13A. TheY-direction inspection region is sequentially set for every pixel columnwidth w_(s).

In step S135, the reference position which is judged whether it shouldbe contained in the inspection region is set inside the Y-directiontentative region. In the illustrated example, the reference position isset at a distance y₀ from the edge of the die 1.

In step S137, a pixel column block 71 located at the reference positionin the captured image is compared with a pixel column block 72 locatedan integral multiple of repeat pitch (y_(T)) away from the referenceposition. In step S139, the value of the comparison result is comparedwith a predetermined threshold value t_(h). As the reference position iscurrently located inside the Y-direction tentative region (step S135),the value of the comparison result is smaller than the threshold value,as shown in FIG. 13C.

In step S141, the reference position is moved by a fine increment of Δyoutwardly toward the boundary of the repeated pattern region 3, afterwhich the process proceeds to step S137. The process from step S137 toS141 is repeated until the reference position reaches the position y_(p)located at the boundary of the repeated pattern region 3.

FIG. 13B is a diagram showing the state in which the reference positionhas reached the position y_(p) located at the boundary of the repeatedpattern region 3. Here, when the pixel column block 71 located at thereference position in the captured image is compared in step S137 withthe pixel column block 72, as the reference position is located at theboundary of the repeated pattern region 3, the value of the comparisonresult rapidly increases upon reaching the boundary, and exceeds thepredetermined threshold value t_(h) as shown in FIG. 13C.

Therefore, in step S139, it is determined that the value of thecomparison result has exceeded the predetermined threshold value t_(h),and the position defined by (present reference position−prescribed shiftamount Δy) is set as the inspection region boundary 65, as shown in FIG.13D (step S143). In this case, in the position y_(p) at which the resultof the comparison between the pixel column block 71 located at thereference position in the captured image and the pixel column block 72located an integral multiple of repeat pitch (y_(T)) away from thereference position exceeds the threshold value t_(h), a small amount ofnoise may be contained in the image of the pixel column block 71;accordingly, the position displaced inwardly of the pattern region 3 bya prescribed number of pixels from the position y_(p) may be determinedas the actual inspection region boundary.

As the scanning by the imaging means 20 progresses, and new image datahaving a pixel column width w_(s) is acquired, the process from stepS133 to step S143 is repeated to sequentially set the Y-directioninspection region. Alternatively, the process from step S133 to stepS143 may be carried out only once and only for the data having the widthw_(s) starting from the boundary 64 of the X-direction inspectionregion, and the Y-direction inspection region obtained here may bedetermined as the inspection region for the entire scanned image.

After that, in step S145, as the image data necessary for comparison iscaptured, the die comparing portion 25 sequentially performs thedie-to-die comparison based on the image signal outside the determinedinspection region, and the cell comparing portion 26 performs thecell-to-cell comparison based on the image signal inside the determinedinspection region.

As shown in FIG. 13C, when the reference position is incrementallyshifted in one prescribed direction outwardly (or inwardly) toward theboundary of the pattern region 3, the value of the comparison resultabruptly changes (increases) when the reference position reaches theposition y_(p) at the boundary of the repeated pattern region 3.

Accordingly, in the flowchart shown in FIG. 11, instead of determiningin step S139 that the value of the comparison result has exceeded thepredetermined threshold value t_(h), and setting in step S143 thereference position as the boundary of the inspection region when thevalue of the comparison result has exceeded the predetermined thresholdvalue t_(h), a determination may be made as to whether the amount ofchange or rate of change between the result of the comparison performedin the previous loop and the result of the comparison performed in thepresent loop exceeds a predetermined threshold value and, when thisamount of change or rate of change exceeds the predetermined thresholdvalue, the present reference position may be set as the boundary of theinspection region. FIG. 12 shows a flowchart of the pattern comparisoninspection method according to the first embodiment of the presentinvention, for explaining such operation of the pattern comparisoninspection apparatus 10.

In step S147, the contents of a storing portion for storing the previouscomparison result are initialized. This storing portion is used tocompare the previous comparison result with the present comparisonresult and compute the amount of change or rate of change between thecomparison results.

Then, as in the pattern comparison inspection method shown in FIG. 11,the Y-direction tentative region is set in step S151, the inspectionregion boundary 64 at which the cell-to-cell comparison is to be startedin the X direction is determined in step S153 in accordance with themethod of FIG. 5, an image of the pattern formed on the die 1 iscaptured in step S133 by scanning the die 1 with the imaging portion 20,the reference position which is judged whether it should be contained inthe inspection region is set inside the Y-direction tentative region instep S135, and the pixel column block 71 located at the referenceposition is compared in step S137 with the pixel column block 72 locatedan integral multiple of repeat pitch (y_(T)) away from the referenceposition.

In step S148, the amount of change or rate of change between thecomparison result stored in the storing portion (the comparison resultobtained in step S137 in the previous loop) and the comparison resultobtained in step S137 (in the present loop) is computed, and it isdetermined whether the amount of change or rate of change between thecomparison results is not greater than a predetermined threshold valuet_(v). If the amount of change or rate of change between the comparisonresults is not greater than the predetermined threshold value t_(v),then in step S149 the comparison result obtained in step S137 is storedin the storing portion for computation of the rate of change for thenext time, and in step S141, the reference position is shifted outwardlytoward the boundary of the repeated pattern region 3. After that, theprocess returns to step S137, to repeat the steps S137, S148, S149, andS141.

If the result of the determination in step S148 shows that the rate ofchange between the comparison results is greater than the predeterminedthreshold value t_(v), then, in step S143, the inspection region isdetermined by setting the present reference position as the boundary ofthe inspection region. After that, in step S145, the die comparingportion 25 performs the die-to-die comparison based on the image signaloutside the determined inspection region, and the cell comparing portion26 performs the cell-to-cell comparison based on the image signal insidethe determined inspection region.

Here, in step S148, instead of determining whether the amount or rate ofchange of the comparison result is not greater than the predeterminedthreshold value t_(v), it may be determined whether or not the amount orrate of change of the comparison result becomes maximum and, if theamount or rate of change of the comparison result is maximum, thepresent reference position may be set as the boundary of the inspectionregion in step S143. For this purpose, the storing portion may beconfigured to store the largest value among the amounts or rates ofchange of the comparison results computed in the past loops, in additionto the comparison result obtained in the previous loop (S137, S148,S149, and S141). Then, in step S149, when storing the comparison resultobtained in S137, it may be determined whether the amount or rate ofchange of the comparison result, computed in step S148, exceeds thelargest value of the amount or rate of change of the comparison resultstored in the storing portion and, if it exceeds the largest value, thenthe largest value of the amount or rate of change of the comparisonresult, stored in the storing portion, may be updated accordingly.

When setting the Y-direction inspection region, a scanned image having acertain width must be acquired for setting. For example, in FIG.13A-13D, if the inspection region is to be enlarged up to the boundary 3of the repeated pattern region by comparing the pixel column block 71located at the reference position in the captured image with the pixelcolumn block 72 located an integral multiple of repeat pitch (y_(T))away from the reference position, an image must be captured that has awidth not smaller than (the distance from the boundary 3 of the repeatedpattern region to the boundary 53 of the tentative region+one repeatpitch length (y_(T)) of the repeated pattern).

Accordingly, when setting the Y-direction inspection region, a sensorcapable of capturing an image having the above-defined width at a timemust be used as the imaging portion 20. Alternatively, as shown in FIG.14, images obtained by scanning a plurality of times ((the distance fromthe boundary 3 of the repeated pattern region to the boundary 53 of thetentative region+one repeat pitch length (y_(T)) of the repeatedpattern)÷width per scan) may be stored together in the image memory 24to create a combined image having the above-defined width. In theexample of FIG. 14, though the image capturing width of the imagingdevice 20 is small, images obtained by scanning four times in therespective scanning sections S1 to S4, S5 to S8, and S9 to S12 can bestored as image data M1, M2, and M3, respectively, in the image memory24.

FIG. 15 shows a flowchart of a pattern comparison inspection methodaccording to a second embodiment of the present invention. In thepattern comparison inspection method according to the second embodimentof the present invention, the respective boundaries 51 and 52 and 53 and54 of the X-direction tentative region and the Y-direction tentativeregion are set outside the repeated pattern region 3. The overallconfiguration of the pattern comparison inspection apparatusimplementing the pattern comparison inspection method according to thesecond embodiment of the present invention is the same as that of thepattern comparison inspection apparatus 10 shown in FIG. 4; therefore,neither an illustration of the configuration nor a description of eachconstituent element will be repeated herein.

In step S161, the X-direction tentative region bounded by the boundarylines 51 and 52 shown in FIG. 17 is set in relationship to the repeatedpattern region 3. Further, the Y-direction tentative region bounded bythe boundary lines 53 and 54 is set in relationship to the repeatedpattern region 3. The boundary lines of each tentative region are setoutside the repeated pattern region 3 given from the control portion 46,by providing a margin with respect to the respective edges of the region3 as previously described.

In step S163, an image of the pattern formed on the die 1 is captured byscanning the die 1 with the imaging portion 20. The captured imagesignal 60 is shown in FIG. 18A.

In step S165, the reference position at which it is judged whether itshould be contained in the inspection region is set outside each of theX- and Y-direction tentative regions. In the illustrated example, thereference position for the X direction is set at a distance X₀ from theedge of the die 1.

In step S167, the pixel column block 61 located at the referenceposition in the captured image is compared with the pixel column block62 located an integral multiple of repeat pitch (x_(T)) away from thereference position. At this time, the multiple of repeat pitch (x_(T))is set in advance according to the margin so that the pixel column block62 is located inside the repeated pattern region 3.

In step S169, the value of the comparison result is compared with apredetermined threshold pixel count value t_(h). As the referenceposition is currently located outside the X-direction tentative region(step S165), the pixel column block 61 is outside the repeated patternregion 3. Accordingly, when the pixel column block 61 is compared withthe pixel column block 62 located inside the repeated pattern region 3,the value of the comparison result is large as shown in FIG. 18C, thatis, larger than the predetermined threshold value t_(h).

In step S171, the reference position is moved by a fine increment of Δxinwardly toward the repeated pattern region 3, after which the processproceeds to step S167. As the value of the comparison result remainslarger than the predetermined threshold value until the referenceposition reaches the position x_(p) located at the boundary of therepeated pattern region 3, the process from step S167 to S171 isrepeated.

FIG. 18B is a diagram showing the state in which the reference positionhas reached the position x_(p) located at the boundary of the repeatedpattern region 3. Here, when the pixel column block 61 located at thereference position in the captured image is compared in step S167 withthe pixel column block 62 located an integral multiple of repeat pitch(x_(T)) away from the reference position, as the reference position islocated at the boundary of the repeated pattern region 3, the value ofthe comparison result rapidly decreases upon reaching the boundary, anddrops below the predetermined threshold value t_(h) as shown in FIG.18C.

Therefore, it is determined that the value of the comparison result hasdroped below the predetermined threshold value t_(h), and thus theposition defined by (present reference position−prescribed shift amountΔx) can be identified as the inspection region boundary. In this case,as in the case of the methods previously described with reference toFIGS. 6 and 12, the position displaced inwardly of the pattern region 3by a prescribed number of pixels from the position x_(p) may bedetermined as the actual inspection region boundary, the position x_(p)being the position at which the result of the comparison between thepixel column block 61 located at the reference position in the capturedimage and the pixel column block 62 located an integral multiple ofrepeat pitch (x_(T)) away from the reference position drops below thethreshold value t_(h).

However, account has to be taken here of the possible occurrence of asituation such as shown in FIG. 19A. FIG. 19A shows the case where thereis a defect 63 near the boundary of the repeated pattern region 3. Inthe case of such image data, the previously described method that setsthe tentative region inside the repeated pattern region 3 simply ends upreducing the inspection region as explained with reference to FIGS. 10Aand 10B; however, in the case of the method that sets the tentativeregion outside the repeated pattern region 3 and detects the boundary ofthe repeated pattern region 3 by working inwardly, as in the presentembodiment, there is the possibility that the inspection region may beerroneously set outwardly of the repeated pattern region 3. That is, inthe presence of such a defect 63, there is the possibility that, asshown in FIG. 19B, the value of the comparison result may drop below thethreshold value t_(h) when the measuring position being moved is stilloutside the repeated pattern region 3.

Therefore, after further moving the reference position by a prescribedamount w_(d) and confirming that the value of the comparison result doesnot exceed the threshold value t_(h) (S173 to S179), the referenceposition at which the value of the comparison result dropped below thepredetermined threshold value t_(h) is set as the boundary of theinspection region (S181).

As in the methods previously described with reference to FIGS. 6 and 12,instead of determining in step S169 in the method of FIG. 15 that thevalue of the comparison result has dropped below the predeterminedthreshold value t_(h), and setting the reference position as theboundary of the inspection region when the value of the comparisonresult has dropped below the predetermined threshold value t_(h), adetermination may be made as to whether the amount of change or rate ofchange between the result of the comparison performed in the previousloop and the result of the comparison performed in the present loopexceeds a predetermined threshold value and, when this amount of changeor rate of change exceeds the predetermined threshold value, the presentreference position may be set as the boundary of the inspection region.FIG. 16 shows a flowchart of the pattern comparison inspection methodaccording to the second embodiment of the present invention, forexplaining such operation of the pattern comparison inspection apparatus10.

In step S184, the contents of a storing portion for storing the previouscomparison result are initialized. This storing portion is used tocompare the previous comparison result with the present comparisonresult and compute the amount of change or rate of change between thecomparison results.

Then, in step S161, the X-direction tentative region and the Y-directiontentative region are set in relationship to the repeated pattern region3, as in the flowchart shown in FIG. 15. In step S163, an image of thepattern formed on the die 1 is captured by scanning the die 1 with theimaging means 20.

In step S165, the reference position which is judged whether it shouldbe contained in the inspection region is set outside each of the X- andY-direction tentative regions. For example, in the case of the Xdirection, the reference position is set at a distance X₀ from the edgeof the die 1. In step S167, the pixel column block 61 located at thereference position in the captured image is compared with the pixelcolumn block 62 located an integral multiple of repeat pitch (x_(T))away from the reference position.

In step S185, the amount of change or rate of change between thecomparison result stored in the storing portion (the comparison resultobtained in step S167 in the previous loop) and the comparison resultobtained in step S167 (in the present loop) is computed, and it isdetermined whether the amount of change or rate of change between thecomparison results is not greater than a predetermined threshold valuet_(v1). If the amount of change or rate of change between the comparisonresults is not greater than the predetermined threshold value t_(v1),then in step S186 the comparison result obtained in step S167 is storedin the storing portion for computation of the amount of change or rateof change for the next time, and in step S171, the reference position isshifted inwardly toward the repeated pattern region 3. After that, theprocess returns to step S167, to repeat the steps S167, S185, S186, andS171.

If the result of the determination in step S185 shows that the rate ofchange between the comparison results is greater than the predeterminedfirst threshold value t_(v1), the reference position is further moved bya prescribed amount w_(d) (S173), and the image signal at the referenceposition is compared with the image signal at the position located anintegral multiple of the repeat pitch away from the reference position(S175).

Then, while the reference position is being moved in step S173, theamount of change or rate of change between the result of the abovecomparison and the comparison result stored in the storing portion iscomputed and, after confirming that the amount of variation of the rateof change does not exceed a second threshold value t_(v2) (S187, S189,and S179), the reference position at which the value of the comparisonresult exceeded the predetermined threshold value t_(v1) is set as theinspection region boundary (S181).

After that, in step S183, the die comparing portion 25 performs thedie-to-die comparison based on the image signal outside the determinedinspection region, and the cell comparing portion 26 performs thecell-to-cell comparison based on the image signal inside the determinedinspection region.

FIG. 20 is a diagram schematically showing the configuration of apattern comparison inspection apparatus according to a third embodimentof the present invention. The pattern comparison inspection apparatus 10of this embodiment captures an image of a circuit pattern or the likethat is formed on a wafer 22 and that contains a repeated pattern regionsuch as a memory cell region, and compares a given threshold value witha difference value taken between two pixels located at positionsseparated from each other by an integral multiple of the repeat pitch inthe captured image. Then, a defect candidate map is generated by takingany pixel for which the difference is larger than the threshold value asa defect candidate; next, in the entire range of the defect candidatemap, a region where the frequency of occurrence of such defectcandidates is lower than a predetermined frequency is determined as therepeated pattern region, while a region where the frequency is higher isdetermined as a region outside the repeated pattern region, and thedefect inspection is performed only within the thus determined repeatedpattern region.

Since the frequency of occurrence of defect candidates is far higheroutside the repeated pattern region than within the repeated patternregion, the inspection region can be determined properly in the abovemanner.

The pattern comparison inspection apparatus 10 comprises: a stage 21 forholding thereon the wafer 22 on which circuit patterns or the likecontaining repeated patterns of memory cells, etc. are formed; animaging portion 20, such as a one-dimensional image sensor, forcapturing an image of the patterns formed on the wafer 22; and a stagecontroller 29 for moving the stage 21 so that the wafer 22 is scanned bythe imaging portion 20 in order for the imaging portion 20 to capturethe image of the patterns across the entire surface of the wafer 22.

The pattern comparison inspection apparatus 10 further comprises: an A/Dconverter 23 which converts the captured analog image signal into animage signal in digital form; a delay memory 81 which delays theanalog-to-digital converted image signal by an amount equal to therepeat pitch of the dies formed on the wafer 22; a die comparing portion25 as a defect candidate detecting portion which obtains the differencevalue between the image signal output from the A/D converter 23 and theimage signal delayed by the delay memory 81, and which detects any pixelfor which the difference value is larger than a predetermined thresholdvalue as a defect candidate; a defect candidate map generating portion82 which, based on the defect candidate detection results from the diecomparing portion 25, generates a die comparing defect candidate mapthat indicates the location of each defect candidate in the capturedimage of the wafer 22; and a defect candidate map memory 83 which storesthe thus generated die comparing defect candidate map.

Further, the pattern comparison inspection apparatus 10 comprises: adelay memory 84 which delays the analog-to-digital converted imagesignal by an amount equal to the repeat pitch of the cells formed asrepeated patterns; a cell comparing portion 26 as a defect candidatedetecting portion which obtains the difference value between the imagesignal output from the A/D converter 23 and the image signal delayed bythe delay memory 84, and which detects any pixel for which thedifference value is larger than a predetermined threshold value V₁ as adefect candidate; a defect candidate map generating portion 85 which,based on the defect candidate detection results from the cell comparingportion 26, generates a cell comparing defect candidate map thatindicates the location of each defect candidate in the captured image ofthe wafer 22; and a defect candidate map memory 86 which stores the thusgenerated cell comparing defect candidate map.

The pattern comparison inspection apparatus 10 further comprises: areference range selecting portion 87 which selects a reference range ofa prescribed size within the cell comparing defect candidate map; and aninspection range determining portion 88 which determines an inspectionrange by containing therein the reference range selected by thereference range selecting portion 87, if the number of defect candidatescontained in the reference range or the proportion of the area occupiedby the defect candidates to the total area of the reference range issmaller than a predetermined second threshold value V₂. Further, thepattern comparison inspection apparatus 10 comprises: a cell comparingdefect detecting portion 90 which checks each defect candidate containedwithin the thus determined inspection range in the cell comparing defectcandidate map to determine whether the defect candidate is a true defector not; a die comparing defect detecting portion 89 which checks eachdefect candidate contained in a region outside the determined inspectionrange but inside the die comparing defect candidate map to determinewhether the defect candidate is a true defect or not; and a resultoutput portion 28 which outputs the detected result.

FIG. 21 is a flowchart of a pattern comparison inspection methodaccording to the third embodiment of the present invention.

In step S201, the imaging portion 20 captures an image of the patternformed on the wafer 22. An example of the image 60 captured by theimaging portion 20 is shown in FIG. 22A.

In step S202, the delay memory 84 delays the captured image 60 by anamount equal to the repeat pitch of the cells formed as repeatedpatterns. An example of the image 67 delayed by the delay memory 84 isshown in FIG. 22B. The cell comparing portion 26 computes the differencevalue between the image signal (the value of each pixel) output from theA/D converter 23 and the image signal delayed by the delay memory 84.

In step S203, the cell comparing portion 26 determines whether thecomputed difference value is larger than the predetermined thresholdvalue V₁. If it is larger than the threshold value V₁, the defectcandidate map generating portion 85 sets the pixel value in the cellcomparing defect candidate map corresponding to the position of thatpixel in the captured image of the wafer 22 to a “1” which indicatesthat the pixel is a defect candidate (S204). Conversely, if thedifference value is smaller than the threshold value V₁, the pixel valuein the cell comparing defect candidate map corresponding to the positionof that pixel in the captured image of the wafer 22 is set to a “0”(S205).

Since the frequency of occurrence of defect candidates is far higheroutside the cell region, which is the repeated pattern region, thanwithin the cell region, the cell comparing defect candidate map obtainedthrough the steps S201 to S205 looks like a map 91, such as shown inFIG. 22C, in which the frequency of occurrence of defect candidates isdistinctly different between the cell region 93 and the outside region92.

By performing the steps S201 to S205 over the entire area of theinspection target region for the pattern comparison inspection, the cellcomparing defect candidate map for the entire area of the inspectiontarget region is generated (FIG. 22D).

In the same manner as in the above steps S201 to S206, the delay memory81 delays the captured image by an amount equal to the repeat pitch ofthe dies formed as repeated patterns, and the die comparing portion 25computes the difference value between the image signal, i.e., the valueof each pixel, output from the A/D converter 23 and the image signaldelayed by the delay memory 81. Then, the defect candidate mapgenerating portion 82 generates the die comparing defect candidate map.

In step S207, the reference range selecting portion 87 selects referenceranges 94 and 95 of prescribed size within the cell comparing defectcandidate map. As examples of the reference ranges selected here, thereference range 94, which is used to determine the X-direction boundaryposition of the inspection range, for example, may be selected as apixel array block having a prescribed length in the Y direction, and thereference range 95, which is used to determine the Y-direction boundaryposition of the inspection range may be selected as a pixel array blockhaving a prescribed length in the X direction. The reference rangeselecting portion 87 selects such pixel array blocks at positions spaceda certain distance away from and within the boundary of the cell rangeprecalculated from the CAD data, etc. used when forming the patterns onthe wafer 22.

Then, in steps S208 and S209, the pixel array block 94 is incrementallyshifted along the X direction outwardly toward the boundary of the cellrange and, likewise, the pixel array block 95 is incrementally shiftedalong the Y direction outwardly toward the boundary of the cell range,until the number of defect candidates contained in the respective pixelarray blocks 94 and 95 or the proportion of the area occupied by thedefect candidates to the total area of the respective reference rangesbecomes equal to or larger than the predetermined threshold value V₂. Asearlier described, the number of defect candidates contained in each ofpixel array blocks 94′ and 95′ located outside the cell range isdramatically larger than the number of defect candidates contained inthe respective pixel array blocks 94 and 95 located inside the cellrange; therefore, in step S210, the inspection range determining portion88 determines the inspection range by setting the X-direction positionof the pixel array block 94 as the X-direction boundary position of thecell region when the number of defect candidates contained in the pixelarray block 94 or the proportion of the area occupied by the defectcandidates to the total area of the reference range becomes equal to orlarger than the threshold value V₂ and also setting the Y-directionposition of the pixel array block 95 as the Y-direction boundaryposition of the cell region when the number of defect candidatescontained in the pixel array block 95 or the proportion of the areaoccupied by the defect candidates to the total area of the referencerange becomes equal to or larger than the threshold value V₂.

Then, in step S211, the cell comparing defect detecting portion 90detects defects contained in the cell region within the thus determinedinspection range in the cell comparing defect candidate map, and the diecomparing defect detecting portion 89 detects defects contained in theoutside-the-cell region which corresponds to the portion of the diecomparing defect candidate map that lies outside the thus determinedinspection range.

The reference range selecting portion 87 in step S207 may select thereference ranges at positions spaced a certain distance away from andoutside the boundary of the cell range precalculated from the CAD data,etc. used when forming the patterns on the wafer 22. In that case, instep S209 the reference range selecting portion 87 may select eachreference range by incrementally shifting its selection positioninwardly toward the boundary of the cell range, and in steps S208 andS210 the inspection range determining portion 88 may determine theposition of the reference range as the cell region boundary positionwhen the number of defect candidates contained in the reference range orthe proportion of the area occupied by the defect candidates to thetotal area of the reference range becomes smaller than the thresholdvalue V₂.

As shown in FIG. 22D, the overall longitudinal length of the referencerange may be set shorter than the cell range dimension so that, when thereference range is located inside the cell range, the reference rangeselected by the reference range selecting portion 87 is contained in itsentirety within the cell range; alternatively, provisions may be madefor the reference range selecting portion 87 to select the referencerange so as to always include portions outside the cell range. Anexample of such selection is shown in FIG. 23A.

As shown in FIG. 23A, the selection range 94 for determining theX-direction boundary is a pixel array extending longitudinally in the Ydirection across the entire width of the map 91, and consists of asubrange 941 as a portion lying inside the cell range 93 and subranges942 and 943 as portions lying outside the cell range 93. When selectingsuch a selection range 94 by incrementally shifting its position in theX direction, as the range 94 always includes the subranges 942 and 943lying outside the cell range, the number of defect candidates containedin these subranges is always detected. Here, when the X-directioncoordinate of the selection range 94 is located inside the cell range93, the width of the portion 941 lying inside the cell range 93 and thewidth of the respective portions 942 and 943 lying outside the cellrange 93 are constant and, when the X-direction coordinate is locatedoutside the cell range 93, the width of the respective portions 942 and943 lying outside the cell range 93 is constant; therefore, as shown inFIG. 23B, the number of defect candidates detected is distinctlydifferent when the X-direction coordinate of the selection range 94 islocated inside the cell range 93 than when it is not located inside thecell range 93. Accordingly, the boundary of the inspection range can bedetermined by selecting the appropriate threshold value V2 in accordancewith the width of the portion 941 lying inside the cell range 93 and thewidth of the respective portions 942 and 943 lying outside the cellrange 93 when the X-direction coordinate of the selection range 94 islocated inside the cell range 93.

Further, the reference range selecting portion 87 may repeatedly selectthe reference range by incrementally shifting the selection position inone direction either inwardly or outwardly toward the boundary of thecell region, and in this case, the inspection range determining portion88 may determine the inspection range based on the rate of change of thenumber of defect candidates contained in the reference range, that is,by setting the cell region boundary position at the position where therate of change of the number of defect candidates exceeds apredetermined threshold value V₃.

Here, generating the defect candidate map is not an essentialrequirement for determining the boundary of the inspection range, butthe inspection range may be determined without generating or making useof the defect candidate map. FIG. 24 is a diagram schematically showingthe configuration of a pattern comparison inspection apparatus accordingto a fourth embodiment of the present invention. The pattern comparisoninspection apparatus 10 shown in FIG. 24 is similar in configuration tothe pattern comparison inspection apparatus shown in FIG. 20, and thesame component elements are designated by the same reference numeralsand the description thereof will not be repeated here.

In this embodiment, the inspection range determining portion 88 countsthe number of defect candidates detected by the cell comparing portion26 for each X-direction pixel array and each Y-direction pixel array inthe captured image of the repeated pattern region, and stores the countsas an X-direction one-dimensional array and a Y-directionone-dimensional array, respectively. Then, in each pixel array, anyposition where the number of defect candidates is not larger than apredetermined threshold value V₂ is determined as being located insidethe inspection range, and any position where the number of defectcandidates is larger than the predetermined threshold value V₂ isdetermined as being located outside the inspection range.

FIG. 25 is a flowchart of a pattern comparison inspection methodaccording to the fourth embodiment of the present invention. First, instep S231, the imaging portion 20 captures an image of the patternformed on the wafer 22. In this case, the imaging portion 20 capturesthe image, for example, by dividing the die 1 into three blocks S1 toS3, as shown in FIG. 26.

In step S232, the cell comparing portion 26 computes the differencevalue between the image signal (the value of each pixel) output from theA/D converter 23 and the image signal delayed by the delay memory 84,and detects the pixel as a defect candidate if the computed differencevalue is larger than the predetermined threshold value V1. Then, whilethe defect candidate map generating portion 85 is constructing thedefect candidate map, the inspection range determining portion 88 countsthe total number of defect candidates detected by the cell comparingportion 26 for each X-direction pixel array and each Y-direction pixelarray in the captured image of the die 1, and stores the counts inX-direction one-dimensional array data 96 and Y-directionone-dimensional array data 97, respectively.

By performing the steps S231 to S232 across the entire cell region 1 forthe pattern comparison inspection (S233), the total number of defectcandidates contained in the captured image is counted for eachX-direction pixel array and each Y-direction pixel array over the entirecell region 1, and the one-dimensional array data 96 and 97 are thusobtained. When creating the X-direction one-dimensional array data 96,the data is computed by summing the total numbers of defect candidatesdetected as the blocks S1 to S3 are scanned in sequence by the imagingportion 20.

Then, in step S234, the X-direction position and Y-direction position atwhich the number of defect candidates in the respective array data 96and 97 becomes equal to or smaller than the predetermined thresholdvalue V₂ are computed to determine the X-direction range and Y-directionrange, respectively; then, in step S235, the cell comparing defectdetecting portion 90 detects defects contained in the cell region withinthe thus determined inspection range in the cell comparing defectcandidate map, and the die comparing defect detecting portion 89 detectsdefects contained in the outside-the-cell region which corresponds tothe portion of the die comparing defect candidate map that lies outsidethe thus determined inspection range.

In the example of FIG. 25, the number of defect candidates is counted atthe same time that the imaging portion 20 captures the image, butinstead, the number of defect candidates may be counted for eachX-direction pixel array and each Y-direction pixel array after capturingand storing all the images of the repeated pattern region; in that case,the counting of the number of defect candidates may be started from aposition inside the boundary of the cell range precalculated from theCAD data, etc., and the X-direction position and Y-direction position atwhich the number of defect candidates in the respective pixel arraysexceeds the predetermined threshold value V₂ may be determined asdefining the inspection range boundary.

While the preferred modes of the present invention have been describedin detail above, it will be understood, by those skilled in the art,that various modifications and changes can be made by anyone skilled inthe art, and that all of such modifications and changes that come withinthe range of the true spirit and purpose of the present invention fallwithin the scope of the present invention as defined by the appendedclaims.

POTENTIAL FOR EXPLOITATION IN INDUSTRY

The present invention can be applied to appearance inspection in which apattern such as a photomask pattern or a pattern formed on asemiconductor wafer of a semiconductor memory or the like is inspectedby sequentially comparing one cell pattern with another cell pattern inthe neighborhood thereof.

1. A pattern comparison inspection method which captures an image of aninspection target pattern having a repeated pattern region with repeatedpatterns formed in a repeated fashion at a prescribed repeat pitch, andwhich detects a defect in said inspection target pattern by comparingimage signals taken from positions located a first integral multiple ofsaid repeat pitch away from each other within an inspection regiondefined inside said repeated pattern region, said method comprising: areference position selecting step for selecting from among positions onsaid inspection target pattern a reference position which is judgedwhether it should be contained in said inspection region; an imagecomparing step for comparing an image signal at said reference positionwith an image signal at a position located a second integral multiple ofsaid repeat pitch away from said reference position and a prescribeddistance inward of the boundary of a region that is known to be saidrepeated pattern region; and an inspection region setting step forsetting said inspection region by containing therein said referenceposition when a comparison result from said image comparing step shows avalue not greater than a prescribed threshold value.
 2. A patterncomparison inspection method which captures an image of an inspectiontarget pattern having a repeated pattern region with repeated patternsformed in a repeated fashion at a prescribed repeat pitch, and whichdetects a defect in said inspection target pattern by comparing imagesignals taken from positions located a first integral multiple of saidrepeat pitch away from each other within an inspection region definedinside said repeated pattern region, said method comprising: a referenceposition selecting step for selecting a reference position which isjudged whether it should be contained in said inspection region, byincrementally shifting said reference position by a prescribed distancewithin said inspection target pattern; an image comparing step forcomparing an image signal at said reference position with an imagesignal at a position located a second integral multiple of said repeatpitch away from said reference position; and an inspection regionsetting step for setting said reference position as the boundary of saidinspection region when a comparison result from said image comparingstep performed by incrementally shifting said reference position by saidprescribed distance shows a change greater than a prescribed thresholdvalue.
 3. A pattern comparison inspection method which captures an imageof an inspection target pattern having a repeated pattern region withrepeated patterns formed in a repeated fashion at a prescribed repeatpitch, and which detects a defect in said inspection target pattern bycomparing image signals taken from positions located a first integralmultiple of said repeat pitch away from each other within an inspectionregion defined inside said repeated pattern region, said methodcomprising: a reference position selecting step for selecting areference position which is judged whether it should be contained insaid inspection region, by incrementally shifting said referenceposition by a prescribed distance within said inspection target pattern;an image comparing step for comparing an image signal at said referenceposition with an image signal at a position located a second integralmultiple of said repeat pitch away from said reference position; and aninspection region setting step for setting said reference position asthe boundary of said inspection region when a comparison result fromsaid image comparing step performed by incrementally shifting saidreference position by said prescribed distance shows a maximum change.4. A pattern comparison inspection method as claimed in any one ofclaims 1 to 3, wherein said image comparing step compares said imagesignal at said reference position with an image signal at a positionlocated further inside said repeated pattern region than said referenceposition is.
 5. A pattern comparison inspection method as claimed in anyone of claims 1 to 3, wherein a position located a prescribed distanceinward of the boundary of said repeated pattern region is selected assaid reference position, and said inspection region is set by repeatedlyperforming said image comparing step while incrementally moving saidreference position outwardly toward the boundary of said repeatedpattern region.
 6. A pattern comparison inspection method as claimed inclaim 2 or 3, further comprising a tentative region setting step forsetting a tentative region a prescribed distance inward of the boundaryof said repeated pattern region, and wherein said image comparing stepcompares said image signal at said reference position with an imagesignal at a position located inside said tentative region.
 7. A patterncomparison inspection method as claimed in any one of claims 1 to 3,further comprising a tentative region setting step for setting atentative region a prescribed distance inward of the boundary of saidrepeated pattern region, and wherein a position located inside saidtentative region is selected as said reference position, and saidinspection region is set by repeatedly performing said image comparingstep while incrementally shifting said reference position outwardlytoward the boundary of said repeated pattern region.
 8. A patterncomparison inspection method as claimed in any one of claims 1 to 3,wherein a position located a prescribed distance outward of the boundaryof said repeated pattern region is selected as said reference position,and said inspection region is set by repeatedly performing said imagecomparing step while incrementally shifting said reference positioninwardly toward the boundary of said repeated pattern region.
 9. Apattern comparison inspection apparatus which comprises an imagingportion which captures an image of an inspection target pattern having arepeated pattern region with repeated patterns formed in a repeatedfashion at a prescribed repeat pitch, a storing portion which storessaid captured image of said inspection target pattern, a patterncomparing portion which compares, on said stored image, image signalstaken from positions located a first integral multiple of said repeatpitch away from each other within an inspection region defined insidesaid repeated pattern region, and a defect detecting portion whichdetects a defect in said inspection target pattern based on a result ofsaid comparison, said apparatus comprising: a reference positionselecting portion which selects from among positions on said inspectiontarget pattern a reference position which is judged whether it should becontained in said inspection region; an image comparing portion whichcompares an image signal at said reference position with an image signalat a position located a second integral multiple of said repeat pitchaway from said reference position and a prescribed distance inward ofthe boundary of a region that is known to be said repeated patternregion; and an inspection region setting portion which sets saidinspection region by containing therein said reference position when acomparison result from said image comparing portion shows a value notgreater than a prescribed threshold value.
 10. A pattern comparisoninspection apparatus which comprises an imaging portion which capturesan image of an inspection target pattern having a repeated patternregion with repeated patterns formed in a repeated fashion at aprescribed repeat pitch, a storing portion which stores said capturedimage of said inspection target pattern, a pattern comparing portionwhich compares, on said stored image, image signals taken from positionslocated a first integral multiple of said repeat pitch away from eachother within an inspection region defined inside said repeated patternregion, and a defect detecting portion which detects a defect in saidinspection target pattern based on a result of said comparison, saidapparatus comprising: a reference position selecting portion whichselects a reference position which is judged whether it should becontained in said inspection region, by incrementally shifting saidreference position by a prescribed distance within said inspectiontarget pattern; an image comparing portion which compares an imagesignal at said reference position with an image signal at a positionlocated a second integral multiple of said repeat pitch away from saidreference position; and an inspection region setting portion which setssaid reference position as the boundary of said inspection region when acomparison result, obtained from said image comparing portion as aresult of incrementally shifting said reference position by saidprescribed distance, shows a change greater than a prescribed thresholdvalue.
 11. A pattern comparison inspection apparatus which comprises animaging portion which captures an image of an inspection target patternhaving a repeated pattern region with repeated patterns formed in arepeated fashion at a prescribed repeat pitch, a storing portion whichstores said captured image of said inspection target pattern, a patterncomparing portion which compares, on said stored image, image signalstaken from positions located a first integral multiple of said repeatpitch away from each other within an inspection region defined insidesaid repeated pattern region, and a defect detecting portion whichdetects a defect in said inspection target pattern based on a result ofsaid comparison, said apparatus comprising: a reference positionselecting portion which selects a reference position which is judgedwhether it should be contained in said inspection region, byincrementally shifting said reference position by a prescribed distancewithin said inspection target pattern; an image comparing portion whichcompares an image signal at said reference position with an image signalat a position located a second integral multiple of said repeat pitchaway from said reference position; and an inspection region settingportion which sets said reference position as the boundary of saidinspection region when a comparison result, obtained from said imagecomparing portion as a result of incrementally shifting said referenceposition by said prescribed distance, shows a maximum change.
 12. Apattern comparison inspection apparatus as claimed in any one of claims9 to 11, wherein said image comparing portion compares said image signalat said reference position with an image signal at a position locatedfarther inside said repeated pattern region than said reference positionis.
 13. A pattern comparison inspection apparatus as claimed in any oneof claims 9 to 11, wherein a position located a prescribed distanceinward of the boundary of said repeated pattern region is selected assaid reference position, and said inspection region is set by repeatedlyperforming said comparison by said image comparing portion whileincrementally moving said reference position outwardly toward theboundary of said repeated pattern region.
 14. A pattern comparisoninspection apparatus as claimed in claim 10 or 11, further comprising atentative region setting portion which sets a tentative region aprescribed distance inward of the boundary of said repeated patternregion, and wherein said image comparing portion compares said imagesignal at said reference position with an image signal at a positionlocated inside said tentative region.
 15. A pattern comparisoninspection apparatus as claimed in any one of claims 9 to 11, furthercomprising a tentative region setting portion which sets a tentativeregion a prescribed distance inward of the boundary of said repeatedpattern region, and wherein a position located inside said tentativeregion is selected as said reference position, and said inspectionregion is set by repeatedly performing said comparison by said imagecomparing portion while incrementally shifting said reference positionoutwardly toward the boundary of said repeated pattern region.
 16. Apattern comparison inspection apparatus as claimed in any one of claims9 to 11, wherein a position located a prescribed distance outward of theboundary of said repeated pattern region is selected as said referenceposition, and said inspection region is set by repeatedly performingsaid comparison by said image comparing portion while incrementallyshifting said reference position inwardly toward the boundary of saidrepeated pattern region.
 17. (canceled)
 18. (canceled)
 19. (canceled)20. (canceled)
 21. (canceled)
 22. (canceled)
 23. (canceled) 24.(canceled)